package de.gwtprime.client.viewsStatic;

import com.google.gwt.user.client.ui.HTMLPanel;

public class LoadingIndictator extends HTMLPanel{

	public LoadingIndictator() {
		this(true);
		
	}
	
	public LoadingIndictator(boolean fullWidth) {
		
		
		super(fullWidth ? "<div style='width:960px;margin-top:20px'> " +
				"<table style='margin:auto'>" +
				"<tr>"+
					"<td><img src='img/ajax-loader.gif'/></td>"+
					"<td style='vertical-align:middle;padding-left:10px;font-weight:bold'>loading...</td>"+
				
				"</tr>"+
			"</table>"+ 
			"</div>":
				"<div> " +
				"<table style='margin:auto'>" +
				"<tr>"+
					"<td><img src='img/ajax-loader.gif'/></td>"+
					"<td style='vertical-align:middle;padding-left:10px;font-weight:bold'>loading...</td>"+
				
					"</tr>"+
				"</table>"+ 
			"</div>"
				);
		
		
	}
	
	public void hideLoadingIcon(){
		setVisible(false);
	}
	
	public void showLoadingIcon(){
		setVisible(true);
	}

}
